1. Field of the Invention
The present invention relates to an image encoding apparatus suitable for adapting to an image forming apparatus using an areal tone method.
2. Description of the Prior Arts
There are following two types in image data performed by a printer.
(1) Raster image information inputted as bit map information. The raster image is generally gray-scale image.
(2) Vector information inputted as an graphic drawing command or text data and converted to raster information by being subjected to graphic drawing and rasterizing at printing. The vector information can generally be represented as an area where uniform pixel value is continuous.
The resolution of the raster information and that of the vector information (a size for one pixel at marking) are not always the same. The raster information showing a natural image is generally sufficient to have a relatively low resolution, with the result that it is expressed with low resolution. Further, the vector information showing a character or graphic image has an importance on positional information, so that it is expressed with high resolution.
For example, character-graphic image information that is vector information is frequently expressed by a binary with high resolution and half-tone image that is a raster image is frequently expressed with low resolution like a method (Conventional Example 1) disclosed in Japanese Unexamined Patent Application No. Hei 8-223423.
In Conventional Example 1, the raster image is gray-scale data of 300 dpi (dot per inch: 1 inch is approximately 25.4 mm) resolution and the vector image is binary data with 600 dpi resolution. At this time, an area for one pixel of the raster image corresponds to an area for four pixels that are the total of two pixels in the longitudinal direction and two pixels in the widthwise direction of the vector image. An example in which the raster image and vector image are present is shown in FIG. 28. In FIG. 28, a single rectangular corresponds to one pixel, a shaded area is a raster image area and the other area is a vector image area.
There are sixteen kinds of a pattern of data for four pixels of the vector image corresponding to one pixel of the raster image as shown in FIG. 29. In Conventional Example 1, the image is a raster image until the level of the pixel value of 0 to 239 in order to express the raster image and vector image on the same plane. Additionally, the image is a vector image until the level of 240 to 255. The data pattern of sixteen kinds shown in FIG. 29 is allotted with respect to the pixel value level of 240 to 255. Since the raster image becomes 240 level, a tone compressing processing shown in FIG. 30A is performed in case where an image of 256 tones is inputted. A tone expanding processing shown in FIG. 30B is performed when an image of 256 tones is outputted.
A higher tone number or resolution is required for printing a digital image with high quality. A capacity of an image is represented by (pixel numberxc3x97tone bit number), thereby being enormous. It is desired to make as small as possible the amount of an image transmitted to a printer or the amount of an image processed in the printer in order to reduce an accumulating cost of an image or transmitting cost.
Various image encoding methods have been proposed as a method for reducing the amount of image data. A typical image encoding method among these methods is JPEG Baseline method (Conventional Example 2). JPEG Baseline method is disclosed in xe2x80x9cInternational Standard of Multi-media Encodingxe2x80x9d, edited by Dr. Yasuda, Maruzen, p. 18 to p. 23 (JPEG: Joint Photographic coding Experts Group). This method is explained hereinafter with regard to FIG. 22.
In FIG. 22, designated at 1001 is an input image, 1002 a block circuit, 1003 a DCT circuit, 1004 a quantizer, 1005 a quantizing table, 1006 a scan converting circuit, 1007 a significant coefficient detecting circuit, 1008 a grouping circuit, 1009 a ran length counter, 1010 a two-dimensional Huffman encoding circuit, 1011 a DC difference calculating circuit, 1012 a grouping circuit, 1013 an one-dimensional Huffman encoding circuit, 1014 a duplexing circuit and 1015 is an output code.
In FIG. 22, the inputted image 1001 is divided into blocks of 8xc3x978 pixels (hereinafter referred to as pixel block) at the block circuit 1002. The pixel block is DCT-transformed at the DCT circuit 1003, whereby a transformed coefficient outputted as a result of the DCT is quantized at the quantizer 1004 in accordance with the quantizing step information memorized at the quantizing table 1005. The quantized converting coefficient can be represented by a matrix of 8xc3x978. The converting coefficient is generally positioned such that the coefficient in the longitudinal direction of the matrix corresponds downwardly to a higher DCT coefficient and the coefficient in the widthwise direction corresponds rightwardly to a higher DCT coefficient. The most leftward and uppermost coefficient among sixty-four converting coefficients is the one corresponding to a direct current frequency area of a DCT transforming area, so that it is called as a direct current component or DC coefficient. The other sixty-three coefficients correspond to an alternating current frequency area, so that it is called as an alternating current component or AC coefficient.
The difference from the DC component of the previous image block is taken out from the DC coefficient at the DC difference calculating circuit 1011, and then the resultant DC coefficient is sent to the grouping circuit 1012.
At the grouping circuit 1012, group numbers and additional bits shown in FIG. 25 are calculated from the DC difference. The additional bit is a value for specifying the DC difference in the same group. The bit numbers of the additional bit are shown in FIG. 25.
The group numbers calculated at the grouping circuit 1012 is Huffman-encoded at the one-dimensional Huffman encoding circuit 1013. Further, the additional bit is sent to the duplexing circuit 1014.
The AC coefficient quantized at the quantizer 1004 is scan-converted to a zigzag scan order shown in FIG. 23 at the scan converting circuit 1006, and then, sent to the significant coefficient detecting circuit 1007. The significant coefficient detecting circuit 1007 determines whether the quantized AC coefficient is xe2x80x9c0xe2x80x9d or except for xe2x80x9c0xe2x80x9d. If xe2x80x9c0xe2x80x9d, a count up signal is supplied to the run length counter 1009 for increasing the counter value by one. If the value of the AC coefficient is a significant coefficient except for xe2x80x9c0xe2x80x9d, a reset signal is supplied to the run length counter 1009 for resetting the counter value as well as the AC coefficient is sent to the grouping circuit 1008.
The run length counter 1009 is a circuit for counting the run length of xe2x80x9c0xe2x80x9d. NNNN that is a number of xe2x80x9c0xe2x80x9d between the significant coefficients is sent to the two-dimensional Huffman encoding circuit 1010. At the grouping circuit 1008, the AC coefficient is divided into group numbers SSSS and additional bits shown in FIG. 24. Then, the group numbers are sent to the two-dimensional Huffman encoding circuit 1010 and the additional bits are sent to the duplexing circuit 1014. The additional bit is a value for specifying the DC difference in the same group. The bit numbers of the additional bit are shown in FIG. 24.
The two-dimensional encoding circuit 1010 performs Huffman encoding to the combination of the run length NNNN and the group number SSSS, and send it to the duplexing circuit 1014.
The duplexing circuit 1014 duplexes the DC coefficient Huffman code, AC coefficient Huffman code, DC coefficient additional bit and AC coefficient additional bit for one pixel block, and then, outputs code data 1015.
As described above, JPEG Baseline encoding method is a lossy encoding method intended for the gray-scale image. Further, the JPEG Baseline encoding method decreases electricity in a high frequency range, in other words, reduces a redundancy expecting characteristics that the neighboring pixel values are liable to be the same values. Accordingly, it is suitable for an ordinal natural image in which a high frequency is reduced. Further, there arises a problem that an encoded distortion occurs or code amount increases for an image in which power in the high frequency range is greatly contrary to the expectation.
The JPEG Baseline encoding method that is a gray-scale image encoding method is advantageous to a natural image in which an power at the high frequency area is small.
Subsequently illustrated as a second example of the image encoding is an example of an MH encoding method disclosed in xe2x80x9cDigital Signal Processing of Imagexe2x80x9d (Nikkan Kogyo Shimbunsha) at 257 pages to 261 pages.
In the MH encoding method, an inputted binary image is scanned in the order of a raster scan shown in FIG. 26. A continuous number (run length) of a black pixel or white pixel is measured in the raster scan order, whereby the run length is Huffman-encoded. A short code is allotted to a run length having a high appearance probability, while a long code is allotted to a run length having a low appearance probability, with the result that efficient encoding is possible.
As described above, the MH encoding method is a lossless encoding method intended for a binary image. The MH encoding method is suitable for a text or graphic image.
The vector image can be represented as an area where a uniform pixel value is continuous. Generally, a data amount of such an image can be reduced by a binary lossless encoding method. The binary lossless encoding method of the MH encoding can be adapted by setting a state that a paint area of the vector image is black (pixel value of 1) and non-paint area is white (pixel value of 0).
When only a raster image or only a vector image is present in a print image, either one of the encoding methods may be utilized. The case where both images are present in the print image becomes a problem.
In the case of inserting in the level of the pixel value like the Conventional Example 1, encoding can be performed by using a gray-scale encoding method such as JPEG Baseline method.
Another method is the one using three plane configuration shown in FIG. 27 (Conventional Example 3).
In the Conventional Example 3, the raster image and vector image are possessed in another plane, and further, a selective information plane of 1-bit per pixel for selecting the raster image and vector image is added, whereby one printing image can be produced. In this method, encoding may be executed such that the raster image is encoded by the gray-scale image encoding method and the vector image and the selective information are encoded by the binary image encoding method.
Moreover, described hereinbelow is the example (Conventional Example 4) in which both images are present in a printing image due to the representation of the tone by the areal tone method.
In the case where a density cannot be changed by a technique for changing a thickness of ink or toner for every each dot in various printing methods, a technique for representing a tone by changing an area in which ink or toner exists is used.
For example, there is an areal tone method by a dither shown in xe2x80x9cImaging Part 1xe2x80x9d, published by SHASHIN KOGYO SHUPPAN-SHA, pp. 118. The areal tone method explained here converts an inputted gray-scale pixel of one pixel into a binary pixel block of 8xc3x978=64 pixels. The inputted pixel value is rendered to be N. Binarization is performed by comparing N with a numerical value of a matrix shown in FIG. 31A. If the value N is greater than the numerical value of each matrix, its pixel becomes ON (a pixel to which ink or toner is adhered). If the value N is smaller than or same as the numerical value of each matrix, its pixel becomes OFF (a pixel to which toner or ink is not adhered).
In the case of the inputted pixel value of 25, for example, a shape shown in FIG. 31B is obtained for representing a tone.
According to the above, the raster image that is a gray-scale image can be represented by the binary image. When the resolution of the vector image becomes the same as the resolution of the dither matrix, the raster image and vector image can be accumulated and encoded by the same system (i.e., accumulated as the binary image and encoded by the binary image encoding method).
The conventional examples explained above still have the following problems.
(1) In case where a resolution of an image inputted with a bit map is higher than a resolution upon printing in a conventional method, a band area is controlled to lower the resolution of the inputted image to the resolution upon printing to thereby perform an encoding for a raster image. However, there is a case that an image is a vector image such as a character graphic image even if the image is inputted with a bit map. Positional information is important for the character graphic image, so that the image quality is deteriorated when the resolution is simply lowered. It is necessary to possess a raster image with a resolution required for the character graphic image in order not to deteriorate the image quality.
For example, assuming that a resolution required for the character graphic image is 24 dot/mm and a resolution required for the natural image is 8 dot/mm. It may be sufficient that one pixel is present in a square of xe2x85x9 mm in length and breadth with respect to the natural image. However, nine pixels (3xc3x973) are required in the square of xe2x85x9 mm in length and breadth in order not to deteriorate the image quality in the case where character graphic image information is present in the image inputted in the form of a bit map. Specifically, as shown in FIG. 32, data for nine pixels is always necessary at the area where one pixel is sufficient when the character graphic information is not present. When the resolution required for the character graphic image becomes higher, an amount of required data further increases.
(2) There are following problems in each conventional example with respect to image data format in the case where both of the gray-scale image information and binary image information are present.
(1) The binary image pattern is converted into a pixel value level in the Conventional Example 1, so that there is a risk that an image does not become the one assumed in the lossy encoding method such as JPEG Baseline method. Specifically, there is no assurance that the pixel level of the adjacent pixel is liable to be similar. In this case, a compression rate of the JPEG Baseline method does not increase.
Further, compression and expansion are performed with the pixel level as it is in the Conventional Example 1, thereby deteriorating the image quality.
(2) There are plural planes in the Conventional Example 3, thereby being complicated. Moreover, two planes exist at the same position as well as the selective information is originally unnecessary information, whereby the pixel amount becomes triple of the minimum necessary amount.
(3) A single process is possible as the binary information as a whole in the Conventional Example 4. However, when the pixel value information, if it is a gray-scale, that could originally be represented by 8-bit is converted into binary dither dot information, 64-bit is required in the example shown in FIGS. 31A and 31B. Moreover, an effective lossy encoding method does not exist in the case of the binary image, whereby the compressing rate cannot be increased to thereby entail a large amount of data.
The present invention has been made in view of the above circumstances and provides an image encoding apparatus that is effective since it is unnecessary to possess information of a resolution beyond necessity by separating image information utilizing for an apparatus for forming an image by an areal tone method into density information of a minimum resolution that is visually significant and positional information where toner or ink is marked, and further provides an image encoding apparatus capable of integrally dealing with gray-scale image information and binary image information.
The present invention realizes an image encoding apparatus that is effective and that does not generate visual distortion by utilizing the following two points with regard to visual characteristics.
(1) Frequency characteristics of vision reduces as the frequency becomes high. This means that a stripe pattern beyond a predetermined frequency cannot visually be detected as a stripe but is visible such that a density value is uniform. FIG. 2 shows this state.
(2) A shift of a phase has sensitivity more than the above-mentioned frequency. This means that a shift amount is detectable even if a period interval is the same as or below the detecting limit. As shown in FIG. 3, although an upper and a lower stripe patterns are hard to see, a boundary line that is shifted by the same interval as the stripe pattern (i.e., a phase is shifted by 180 degrees) is clearly seen.
This is because a visual model is shown as the following.
The visual model will be explained with reference to FIG. 21. Light is irradiated to a printing image. A component saved from the absorption from ink or toner becomes an incident light to an eye. Image information can generally be represented by a noncyclic process with two aspects of an image position and frequency characteristics as variables. The incident light to an eye is represented by F(xcfx89, t) by using an image position t and angular frequency xcfx89. As shown in FIG. 21, it is considered that two processes, i.e., an image position differential xcex8/xcex8t and a frequency transfer function H(xcfx89) with respect to the incident light information. The frequency transfer function H(xcfx89) is a function that reduces as the frequency becomes high. The formula xcex8/xcex8t is a process for extracting an edge by differentiating the image information with poisitonal information. The results of the processing, i.e.,xcex8F(xcfx89, t)/xcex8t and H(xcfx89) F(xcfx89, t) are overlapped by some format to finally be a perception. It is considered that human""s vision simultaneously performs two processes, namely a process to see by uniformly integrating a pixel value and a process to see by extracting a boundary of an object. Therefore, it is considered that an ability to feel a half-tone in an areal tone such as a dither is due to the former processing and that an ability to recognize a shape of an object is due to the latter process.
In view of the above consideration, the present invention provides an image encoding apparatus capable of integrally representing an image with a minimum necessary data amount by representing all pixels with a lowest resolution of a detecting limit and by separately affording information of a phase shift that cannot be represented with the lowest resolution.
The information of the lowest resolution is a pixel value itself, so that it is given as gray-scale information.
Further, all of them are finally binarized and marked in the areal tone. The binary image can be represented by a position of an ON image, i.e., a position of a marked ink or toner. This position corresponds to the phase shift.
According to an aspect of the present invention, an image encoding apparatus has a part that generates, based upon image information, areal data representing an area of a mark outputted to an inside of a pixel having a size corresponding to a screen resolution, and a part that generates positional data representing the position of the mark inside the pixel. The image information is represented by the areal data and the positional data.
The screen resolution means a limit resolution by which the stripe pattern is not detected but the density value is averaged. The position of the mark means the amount of the phase shift.
A conceptional explanation of this method is performed with reference to FIG. 4. In FIG. 4, it is assumed that a precision of the phase information double of the screen resolution is required. Further, it is assumed that the pixel value level is 0 to 255.
The raster image that is an ordinal natural image can be represented with a minimum resolution, whereby the position to which ink or toner is marked may be everywhere. Specifically, it is sufficient that a suitable areal tone is performed. As shown in FIG. 4A, it can be represented only by a pixel value. Similarly, the pixel value 0(b) and pixel value 255(f) are also represented only by a pixel value. In the case of an image requiring a phase information such as a character graphic image or the like, it is encoded like FIGS. 4C, 4D and 4E. For example, the pixel value is 64 in FIG. 4C due to the occupation of xc2xc of the total area. The positional information of lower right is critical. When the positional information of xe2x80x9clower rightxe2x80x9d is added to the pixel value, the information of the pixel value of FIG. 4C can be maintained without distortion. It becomes possible to encode the character graphic image information without distortion by adding the positional information of lower right. As for FIG. 4D, the character graphic image information can be encoded without distortion by giving positional information of xe2x80x9clowerxe2x80x9d to the pixel value of xe2x80x9c128xe2x80x9d. As for E, the character graphic image information can be encoded without distortion by giving positional information of xe2x80x9cother than upper leftxe2x80x9d to the pixel value of xe2x80x9c192xe2x80x9d.
According to another aspect of the present invention, the image encoding apparatus has a first input unit that inputs a gray-scale bit map image, a second input unit that inputs a computer-formed image, a unit that obtains, based upon the gray-scale bit map image, an area of a first mark in a pixel having a size corresponding to a screen resolution, a unit that obtains an area of a second mark in the pixel based upon the computer formed image, a composing unit that obtains an area of a third mark by overlapping the area of the first mark and the area of the second mark, a unit that generates areal data representing an area of the third mark, and a unit that generates positional data representing a position of the third mark. The image information is represented by the areal data and the positional data.
The gray-scale bit map information is the raster image described in the conventional example. The computer formed image means the vector image described in the conventional example. The position of the mark (image formation) shows the position where ink or toner is adhered in a printing apparatus of the areal tone method. The position where the mark is formed is a composition of the position where the raster image is formed and the position where the vector image is formed, whereby the image encoding apparatus according to another aspect of the present invention has a composing unit.
According to another aspect of the present invention, the image encoding apparatus has a unit that inputs a gray-scale bit map image, a unit that generates, based upon the gray-scale bit map image, areal data representing an area of a mark in a pixel having a size corresponding to a screen resolution, and a unit that generates, based upon the gray-scale bit map image, positional data representing a position of the mark in the pixel. The image information is represented by the areal data and the positional data.
The image encoding apparatus according to another aspect of the present invention is suitable only for the case where the input image is the gray-scale bit map.
According to another aspect of the present invention, the image encoding apparatus has a unit that inputs a computer-formed image, a unit that generates, based upon the computer formed image, areal data representing an area of a mark in a pixel having a size corresponding to a screen resolution, and a unit that generates, based upon the computer formed image, positional data representing a position of the mark in the pixel. The image information is represented by the areal data and the positional data.
The image encoding apparatus according to another aspect of the present invention is suitable only for the case where the input image is the computer-formed image.